package com.yomahub.tlog.example.dubbo.controller;

import com.yomahub.tlog.example.dubbo.service.DemoService;
import com.yomahub.tlog.example.dubbo.service.DemoServiceA;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class DemoController {

    private Logger log = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private DemoServiceA demoServiceA;

    @RequestMapping("/hi")
    public String sayHello(@RequestParam String name){
        log.info("node A");
        String str = demoServiceA.sayHello(name);
        return str;
    }
}
